<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0044)http://www.ht13168.cn/user_igc/english/u_sys? -->
<?php use_helper('I18N') ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>ht13168.cn</title>

    <script type='text/javascript' src='/js/jquery/jquery-1.6.2.min.js'></script>
    <script type='text/javascript' src='/js/jquery/jquery-ui-1.8.11.custom.min.js'></script>
    <script type='text/javascript' src='/js/jquery/jquery.blockUI.js'></script>
    <script type='text/javascript' src='/js/jquery/jquery.validate.js'></script>
    <link rel="stylesheet" type="text/css" href="/images/cm/slide.css">
    <link rel='stylesheet' href='/css/smoothness/jquery-ui-1.8.18.custom.css' type='text/css'/>
    <link rel='stylesheet' type='text/css' media='screen' href='/css/validate/validate.css'/>
    <style type="text/css">td img {
        display: block;
    }

    body {
        margin-left: 0px;
        margin-top: -5px;
        margin-right: 0px;
        margin-bottom: 0px;
        background-image: url(/images/cm/home_bg.png);
        background-repeat: no-repeat;
        background-position: center;
        background-position: top;
        background-size: auto;
        background-color: black;
        font-family: arial;
        font-size: 12px;
        color: white;
    }

    th td {
        font-size: 12px;
    }

    a {
        text-decoration: none;
        color: white;
    }
    /* digital clock */
    /* If you want you can use font-face */
    @font-face {
        font-family: 'BebasNeueRegular';
        src: url('BebasNeue-webfont.eot');
        src: url('BebasNeue-webfont.eot?#iefix') format('embedded-opentype'),
             url('BebasNeue-webfont.woff') format('woff'),
             url('BebasNeue-webfont.ttf') format('truetype'),
             url('BebasNeue-webfont.svg#BebasNeueRegular') format('svg');
        font-weight: normal;
        font-style: normal;
    }

    .clock {width:200px; margin:0 auto; padding:0px; color:#fff; }
    #Date { font-family:'BebasNeueRegular', Arial, Helvetica, sans-serif; font-size:11px; text-align:center; text-shadow:0 0 5px #00c6ff; width: 120px; }
    .clock ul { width:160px; margin:0 auto; padding:0px; list-style:none; text-align:center; }
    .clock td { display:inline; font-size:11px; text-align:center; font-family:'BebasNeueRegular', Arial, Helvetica, sans-serif; text-shadow:0 0 5px #00c6ff; }
    #point { position:relative; -moz-animation:mymove 1s ease infinite; -webkit-animation:mymove 1s ease infinite; padding-left:0px; padding-right:0px; }

    /* Simple Animation */
    @-webkit-keyframes mymove
    {
    0% {opacity:1.0; text-shadow:0 0 20px #00c6ff;}
    50% {opacity:0; text-shadow:none; }
    100% {opacity:1.0; text-shadow:0 0 20px #00c6ff; }
    }

    @-moz-keyframes mymove
    {
    0% {opacity:1.0; text-shadow:0 0 20px #00c6ff;}
    50% {opacity:0; text-shadow:none; }
    100% {opacity:1.0; text-shadow:0 0 20px #00c6ff; }
    }
    </style>

    <script type="text/javascript">
    $(document).ready(function() {
        $("#submitLink").click(function(event) {
            event.preventDefault();
            $("#registerForm").submit();
        });

        /*$("#captchaimage").bind('click', function() {
            $.post('/captcha/newSession');
            $("#captchaimage").load('/captcha/imageRequest');
            return false;
        });*/
        jQuery.validator.addMethod("noSpace", function(value, element) {
            return value.indexOf(" ") < 0 && value != "";
        }, "No space please and don't leave it empty");

        jQuery.validator.addMethod("loginRegex", function(value, element) {
            return this.optional(element) || /^[a-z0-9\-\s\_]+$/i.test(value);
        }, "This field only accept latin word, numbers, or dashes.");

        jQuery.validator.addMethod("latinRegex", function(value, element) {
            return this.optional(element) || /^[a-z0-9\-\s\_\/\.]+$/i.test(value);
        }, "This field only accept latin word, numbers, or dashes.");

        $("#registerForm").validate({
            messages : {
                "confirmPassword": {
                    equalTo: "<?php echo __('Please enter the same password as above') ?>"
                },
                "reg_ib": {
                    remote: "<?php echo __('Invalid Outlet Code') ?>."
                },
                "reg_username": {
                    remote: "<?php echo __('User Name already in use') ?>."
                },
                "fullname": {

                }
            },
            rules: {
                "fullname" : {
                    required: true
                },
                "sponsorId" : {
                    required : true
                },
                "reg_ib" : {
                    required : true,
                    remote: "/member/verifyIB"
                },
                /*"reg_username" : {
                    required : true,
                    noSpace: true,
                    loginRegex: true,
                    minlength : 6,
                    remote: "/member/verifyUserName"
                },*/
                "email" : {
                    required: true
                    , email: true
                },
                "reg_userpassword" : {
                    required : true,
                    minlength : 6
                },
                "confirmPassword" : {
                    required : true,
                    minlength : 6,
                    equalTo: "#reg_userpassword"
                },
                "contact" : {
                    required: true
                },
                "reg_captcha" : {
                    required: true
                }
            },
            submitHandler: function(form) {
                waiting();
                $.ajax({
                    type : 'POST',
                    url : "/member/verifySponsorId",
                    dataType : 'json',
                    cache: false,
                    data: {
                        sponsorId : $('#sponsorId').val()
                    },
                    success : function(data) {
                        if (data == null || data == "") {
                            error("<?php echo __('Invalid Referrer ID') ?>");
                            $('#sponsorId').focus();
                            $("#sponsorName").val("");
                        } else {
                            form.submit();
                        }
                    },
                    error : function(XMLHttpRequest, textStatus, errorThrown) {
                        error("Your login attempt was not successful. Please try again.");
                    }
                });
            }
        });

        $("#sponsorId").change(function() {
            if ($.trim($('#sponsorId').val()) != "") {
                verifySponsorId();
            }
        });

        <?php if ($sf_flash->has('successMsg')) { ?>
            alert("<?php echo $sf_flash->get('successMsg') ?>");
        <?php } ?>
        <?php if ($sf_flash->has('errorMsg')) { ?>
            error("<?php echo $sf_flash->get('errorMsg') ?>");
        <?php } ?>
    });

    function verifySponsorId() {
        waiting();
        $.ajax({
            type : 'POST',
            url : "/member/verifyActiveSponsorId",
            dataType : 'json',
            cache: false,
            data: {
                sponsorId : $('#sponsorId').val()
                , verifySameGroup : "Y"
            },
            success : function(data) {
                if (data == null || data == "") {
                    error("<?php echo __('Invalid Referrer ID') ?>");
                    $('#sponsorId').focus();
                    $("#sponsorName").val("");
                } else {
                    $.unblockUI();
                    $("#sponsorName").val(data.userName);
                }
            },
            error : function(XMLHttpRequest, textStatus, errorThrown) {
                alert("Your login attempt was not successful. Please try again.");
            }
        });
    }

    function waiting() {
        /*$("#waitingLB h3").html("<h3>Loading...</h3><div id='loader' class='loader'><img id='img-loader' src='/images/loading.gif' alt='Loading'/></div>");*/
        $("#waitingLB h3").html("<h3 style='width: 100%; padding-left: 0px; background-color:inherit; color: black; line-height:0px; margin-top: 20px;'>Loading...</h3><div id='loader' class='loader'><img id='img-loader' src='/images/loading.gif' alt='Loading'/></div>");

        $.blockUI({
                    message: $("#waitingLB")
                    , css: {
                        border: 'none',
                        padding: '5px',
                        'background-color': '#fff',
                        '-webkit-border-radius': '10px',
                        '-moz-border-radius': '10px',
                        'border-radius': '10px',
                        opacity: .8,
                        color: '#000'
                    }});
        $(".blockOverlay").css("z-index", 1010);
        $(".blockPage").css("z-index", 1011);
    }
    function alert(data) {
        var msgs = "";
        if ($.isArray(data)) {
            jQuery.each(data, function(key, value) {
                msgs = value + "<br>";
            });
        } else {
            msgs = data + "<br>";
        }

        var alertPanel = "<div style='padding: 10px; line-height :normal' class='ui-state-highlight ui-corner-all'><p><span style='float: left; margin-right: .3em;' class='ui-icon ui-icon-info'></span>";
        alertPanel += msgs + "</p></div>";
        $("#waitingLB h3").html(alertPanel);
        $.blockUI({
                    message: $("#waitingLB")
                    , css: {
                        border: 'none',
                        padding: '5px',
                        '-webkit-border-radius': '10px',
                        '-moz-border-radius': '10px',
                        'border-radius': '10px',
                        opacity: .9
                    }});
        $(".blockOverlay").css("z-index", 1010);
        $(".blockPage").css("z-index", 1011);
        $('.blockOverlay').attr('title', 'Click to unblock').click($.unblockUI);
    }
    function error(data) {
        var msgs = "";
        if ($.isArray(data)) {
            jQuery.each(data, function(key, value) {
                msgs = value + "<br>";
            });
        } else {
            msgs = data + "<br>";
        }

        var errorPanel = "<div style='padding: 10px; line-height :normal' class='ui-state-error ui-corner-all'>";
        errorPanel += "<p><span style='float: left; margin-right: .3em;' class='ui-icon ui-icon-alert'></span>";
        errorPanel += msgs + "</p></div>";
        $("#waitingLB h3").html(errorPanel);
        $.blockUI({
                    message: $("#waitingLB")
                    , css: {
                        border: 'none',
                        padding: '5px',
                        '-webkit-border-radius': '10px',
                        '-moz-border-radius': '10px',
                        'border-radius': '10px',
                        opacity: .9,
                        'min-width': '30%',
                        'width': '60%',
                        left: '25%',
                        top: '25%'
                    }});
        $(".blockOverlay").css("z-index", 1010);
        $(".blockPage").css("z-index", 1011);
        $('.blockOverlay').attr('title', 'Click to unblock').click($.unblockUI);
    }
    </script>
<!--    <script id="facebook-jssdk" src="/images/cm/all.js"></script>-->
<!--    <script src="/images/cm/jquery.js"></script>-->
</head>

<img src="/images/loading.gif" style="display: none;">
<body bgcolor="#ffffff">
<div id="waitingLB" style="display:none; cursor: default">
    <h3 style="width: 100%; padding-left: 0px; background-color:inherit; color: black; line-height:0px; margin-top: 0px">We are processing your request. Please be patient.</h3>
</div>

<table width="100%">
<tbody>
<tr>
<td align="center">
<table cellspacing="0" cellpadding="0" width="1265px" border="0">
<tbody>
<tr>
    <td rowspan="4" style="width:135px;"></td>
    <td style="width:1020px;">
        <?php include_component('component', 'headerInformation', array('param' => $sf_user->getAttribute(Globals::SESSION_DISTID, 0))) ?>
    </td>
    <td rowspan="4" style="width:135px;"></td>
</tr>
<tr>

<td style="padding-top:0px;background-color:#2D2D2D">
<style>.btn {
    height: 25px;
    width: 86px;
    cursor: pointer;
    font-weight: bold;
    display: table-cell;
    padding-top: 5px;
    padding-left: 25px;
}

.olclass li {
    list-style-type: decimal;
    font-size: 12px;
}

.olclass2 li {
    list-style-type: lower-roman;
    font-size: 12px;
}</style>
<table style="background-color:#2D2D2D;width:100%" cellpadding="0" cellspacing="0">
<tbody>
<tr style="height:18px;text-align:left;">
    <th colspan="8" style="background-image:url(/images/cm/promo_titleBg.jpg);text-align:left;height:27px;">
        <div style="background:url(/images/cm/promo_titleIcon.png) no-repeat;padding-left:30px;color:black;height:27px;display:table-cell;vertical-align:middle;">
            <?php echo __('Member Registration') ?>
        </div>
    </th>
</tr>
<tr>
<td colspan="8" style="text-align:left;vertical-align:top;padding:5px;" align="top">
<table style="margin-top:3px;  margin-right:20px; font-size:12px; " width="100%">
<tbody>
<tr>
    <td style="background-color:rgba(0,0,0,0.7);border:1px solid gray" width="100%">
        <table width="100%">
            <tbody>
            <tr>
                <td colspan="2">
                    <div id="promo1" style="width:935px; padding: 10px 30px 30px 30px;">
                        <br>

                        <form action="/home/doRegister" method="post" name="registerForm" id="registerForm">
                            <table width="60%" cellspacing="0" cellpadding="0" border="0" align="center">
                                <tbody>
                                <tr>
                                    <td style="font-weight: bold; width: 150px"><?php echo __('Outlet Code') ?></td>
                                    <td>
                                        <input type="text" size="38" id="reg_ib" name="reg_ib" value="" placeholder='<?php echo __('Outlet Code') ?>'>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td colspan="2">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td><?php echo __('Referrer ID') ?></td>
                                    <td>
                                        <input type="text" size="38" class="inputbox" id="sponsorId" placeholder='<?php echo __('Referrer ID') ?>' name="sponsorId" value="<?php //echo $sponsorId;?>">
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td colspan="2">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td><?php echo __('Referrer Name') ?></td>
                                    <td>
                                        <input type="text" size="38" class="inputbox" id="sponsorName" placeholder='<?php echo __('Referrer Name') ?>' name="sponsorName" value="<?php //echo $sponsorName;?>" readonly="readonly">
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td colspan="2">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td style="font-weight: bold; width: 150px"><?php echo __('Package') ?></td>
                                    <td>
                                        <select id="regPackage" name="regPackage">
                                            <?php
                                            foreach ($packageDBs as $packageDB) {
                                                echo "<option value='" .$packageDB->getPackageId(). "'>".$packageDB->getPackageName()."</option>";
                                            }
                                            ?>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td colspan="2">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td style="font-weight: bold; width: 150px"><?php echo __('Full Name') ?></td>
                                    <td>
                                        <input type="text" size="38" id="fullname" name="fullname" value="<?php echo $fullname ?>" placeholder='<?php echo __('Full Name') ?>'>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td style="color: #009aea"><?php echo __('The name must match with your bank account name for withdrawal') ?></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td colspan="2">&nbsp;</td>
                                </tr>
                               <!-- <tr>
                                    <td style="font-weight: bold; width: 150px"><?php /*echo __('User Name') */?></td>
                                    <td>
                                        <input type="text" size="38" id="reg_username" name="reg_username" value="<?php /*echo $username */?>" placeholder='User Name'>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td colspan="2">&nbsp;</td>
                                </tr>-->
                                <tr>
                                    <td style="font-weight: bold; width: 150px"><?php echo __('Password') ?></td>
                                    <td>
                                        <input type="password" size="38" class="inputbox" id="reg_userpassword" name="reg_userpassword">
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td colspan="2">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td style="font-weight: bold; width: 150px"><?php echo __('Confirm Password') ?></td>
                                    <td>
                                        <input type="password" size="38" class="inputbox" id="confirmPassword" name="confirmPassword">
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td colspan="2">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td style="font-weight: bold;"><?php echo __('Email') ?></td>
                                    <td>
                                        <input type="text" size="38" id="email" name="email" value="<?php echo $email ?>" placeholder='<?php echo __('Email') ?>'>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td style="color: #009aea"><?php echo __('Please provide an active email address to facilitate future payment related correspondences, eg withdrawals, bonuses.') ?> </td>
                                </tr>
                                <tr>
                                    <td colspan="2">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td style="font-weight: bold;"><?php echo __('Phone Number') ?></td>
                                    <td>
                                        <input type="text" size="38" id="contact" name="contact" value="<?php echo $contact ?>" placeholder='<?php echo __('Phone Number') ?>'>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td style="color: #009aea"><?php echo __('Please provide a valid contact number for payment correspondences and account verification.') ?> </td>
                                </tr>
                                <tr>
                                    <td colspan="2">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td style="font-weight: bold;"><?php echo __('Validation Code') ?></td>
                                    <td>
                                        <table>
                                            <tr>
                                                <td>
<!--                                                    <a href="--><?php //echo $_SERVER['PHP_SELF']; ?><!--" title="Click to refresh image">-->
                                                    <img src="/captcha/image?<?php echo time(); ?>" width="60" height="25" alt="Captcha image" style="border-style: none"/>
<!--                                                    </a>-->
                                                </td>
                                                <td>
                                                    <input class="input" tabindex="3" type="text" name="reg_captcha" placeholder="<?php echo __('Code') ?>" id="reg_captcha" maxlength="4" style="width:35px;">
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td colspan="2">&nbsp;</td>
                                </tr>
                                </tbody>
                            </table>

                            <table width="60%" cellspacing="0" cellpadding="0" border="0" align="center">
                                <tbody>
                                <tr>
                                    <td></td>
                                    <td style="color: #009aea">
                                        <?php echo __('By submitting this application, I verify that I am of legal age and my activities on this website does not contravene with the laws of my own jurisdiction.') ?>
                                        <br>
                                        <?php echo __('I also accept all Terms and Condition and Privacy Policy bound by this submission.') ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="font-weight: bold; width: 150px"></td>
                                    <td valign="middle" height="45" align="left">
                                        <button type="submit" id="submitLink"
                                                style="width: 80px; background-color: #e5eef5"><?php echo __('Submit') ?></button>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </form>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
    <td style="padding-top:0px">
        <?php include_component('component', 'footerInformation', array('param' => $sf_user->getAttribute(Globals::SESSION_DISTID, 0))) ?>
    </td>
</tr>
<tr>
    <td style="padding-top:0px;height:auto"></td>
</tr>
</tbody>
</table>

<!--<iframe src="//www.facebook.com/plugins/follow?href=https%3A%2F%2Fwww.facebook.com%2Fprofile.php%3Fid%3D100006406212675&amp;layout=standard&amp;show_faces=true&amp;colorscheme=light&amp;width=450&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>-->
</td>
</tr>
</tbody>
</table>
</body>
</html>